import Vue from 'vue'
const requireDirectives = require.context('../directives', true, /\.js$/)
requireDirectives.keys().forEach((fileName) => {
  const directiveConfig = requireDirectives(fileName)
  const directiveName = directiveConfig.default.name
  Vue.directive(directiveName, directiveConfig.default)
})
